]> dgit.raspbian.org Git - gnome-shell.git/commit
extensions-tool: Fix removing from settings list
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 25 Nov 2019 00:49:04 +0000 (01:49 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 25 Nov 2019 15:18:08 +0000 (16:18 +0100)
commitbb48205aae34e6bf0ce1810ab784bf36f00bc4d2
tree6938527d3da2604b09d3b7cde20011b11af4e3cf
parent5a287a42057d896bd21181cbfbf51cf1d6aef545
extensions-tool: Fix removing from settings list

When removing a string from a settings list, we iterate over all
existing entries and copy all strings except the one that's being
removed to a new list, which is then written to GSettings.

However we currently always increment the index, so we end up with
a NULL entry in place of the removed entry, which is then interpreted
as the end of the list. In other words, we also remove all entries
that follow the removed string.

Fix this by looping over the list entries instead of the index, and
only increment the index for entries we copy.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1946
src/extensions-tool/main.c